
func int B_TeachPlayerTalentForeignLanguage(var C_Npc slf,var C_Npc oth,var int Language)
{
	var int kosten;
	var int money;
	kosten = B_GetLearnCostTalent(oth,NPC_TALENT_FOREIGNLANGUAGE,Language);
	money = kosten * 200;
	if(oth.lp < kosten)
	{
		PrintScreen(PRINT_NotEnoughLearnPoints,-1,-1,FONT_ScreenSmall,2);
		B_Say(slf,oth,"$NOLEARNNOPOINTS");
		return FALSE;
	};
	if(Npc_HasItems(oth,ItMi_Gold) < money)
	{
		PrintScreen(Print_NotEnoughGold,-1,-1,FONT_Screen,2);
		B_Say(slf,oth,"$ShitNoGold");
		return FALSE;
	};
	oth.lp = oth.lp - kosten;
	Npc_RemoveInvItems(oth,ItMi_Gold,money);
	Log_CreateTopic(TOPIC_Language,LOG_NOTE);
	if(Language == LANGUAGE_1)
	{
		PLAYER_TALENT_FOREIGNLANGUAGE[LANGUAGE_1] = TRUE;
		B_LogEntry(TOPIC_Language,LogText_Addon_Language_1);
	};
	if(Language == LANGUAGE_2)
	{
		PLAYER_TALENT_FOREIGNLANGUAGE[LANGUAGE_2] = TRUE;
		B_LogEntry(TOPIC_Language,LogText_Addon_Language_2);
	};
	if(Language == LANGUAGE_3)
	{
		PLAYER_TALENT_FOREIGNLANGUAGE[LANGUAGE_3] = TRUE;
		B_LogEntry(TOPIC_Language,LogText_Addon_Language_3);
	};
	if(Language == LANGUAGE_4)
	{
		PLAYER_TALENT_FOREIGNLANGUAGE[3] = TRUE;
		B_LogEntry(TOPIC_Language,LOGTEXT_ADDON_LANGUAGE_4);
	};
	if(Language == LANGUAGE_4)
	{
		PrintScreen(PRINT_LEARNFOREIGNLANGUAGEDEMON,-1,-1,FONT_Screen,2);
	}
	else
	{
		PrintScreen(PRINT_LearnForeignLanguage,-1,-1,FONT_Screen,2);
	};
	Npc_SetTalentSkill(oth,NPC_TALENT_FOREIGNLANGUAGE,1);
	Snd_Play("LevelUP");
	return TRUE;
};

